import {
    shallowRef,
    unref
} from 'vue' ;

export default () => {

    const routerRef = shallowRef();

    return {
        setup(router){

            routerRef.value = router ;
        },

        redirect(path){

            unref(routerRef).push(path) ;
        }
    } ;

}